# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=asteroid
pkgname=asteroid-calculator
pkgver=2.0.0
pkgrel=0
pkgdesc="Default calculator app for AsteroidOS"
url="https://github.com/AsteroidOS/asteroid-calculator"
# armhf blocked by qml-asteroid
arch="all !armhf"
license="GPL-3.0-or-later"
depends="mapplauncherd"
makedepends="
	extra-cmake-modules
	qml-asteroid-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/AsteroidOS/asteroid-calculator/archive/refs/tags/$pkgver.tar.gz"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
7a115627715864a6261ef1c46b4c61777b8013abe82a904ebe7aab803d4f31d3115390fd5a9c834529eb738e01bce19872a91c117bb1f60df96c67609f448a24  asteroid-calculator-2.0.0.tar.gz
"
